@/*
          导入excel参数的说明:
    name : 名称
    confirmInfo : 提示信息
    url : 名称
    btnType : 按钮的类型决定了颜色(default-灰色,primary-绿色,success-蓝色,info-淡蓝色,warning-黄色,danger-红色,white-白色)
    space : 按钮左侧是否有间隔(true/false)
    cls : 样式class
@*/
@var spaceCss = "";
@var btnType = "";
@if(isNotEmpty(space)){
@   //spaceCss = "button-margin";
@}
@if(isEmpty(btnCss)){
@   btnType = "btn-"+"primary";
@}else{
@   btnType = "btn-"+btnCss;
@}
<button type="button" class="btn ${btnType} ${spaceCss} ${cls!}" id="excel_import_btn_${id!}">
    <i class="fa fa-upload"></i>&nbsp;${name!}
</button>
<span class="hidden" id="${id}BtnId">
</span>
<div id="${id}_progressBar" class="progress progress-striped progressBar">
	<div style="width: 0%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" role="progressbar" class="progress-bar progress-bar-info ">
	</div>
</div>

<script>
$(function () {
    // 初始化头像上传
    var _wu_${id} = new $WebUpload("${id}")
    _wu_${id}.setUploadUrl("${url!}")
    _wu_${id}.init();
    $("#excel_import_btn_${id!}").click(function(){
        var operation = function(){
            $("#${id}BtnId").find("label").trigger("click");
        };
        Sys.confirm("${confirmInfo!"现在上传吗?"}",operation);
    });
});
</script>
